<%--
  +------------------+
      天 道 酬 勤    
  +------------------+
  Created by QiuShiju.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>注册页面</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f0f0f0;
      padding: 20px;
    }
    .container {
      max-width: 400px;
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      padding: 20px;
      margin: 0 auto;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      font-weight: bold;
      display: block;
      margin-bottom: 8px;
    }
    input[type=text], input[type=password], input[type=tel] {
      width: calc(100% - 20px);
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    select {
      width: calc(100% - 22px);
      padding: 10px;
      font-size: 16px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    input[type=submit] {
      background-color: #4CAF50;
      color: white;
      padding: 12px 20px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 16px;
    }
    input[type=submit]:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>
<div class="container">
  <h2>用户注册</h2>
  <form action="/regist" method="POST">
    <div class="form-group">
      <label for="username">用户名:</label>
      <input type="text" id="username" name="username" required>
    </div>
    <div class="form-group">
      <label for="password">密码:</label>
      <input type="password" id="password" name="password" required>
    </div>
    <div class="form-group">
      <label for="phone">手机号:</label>
      <input type="tel" id="phone" name="phone" pattern="[0-9]{11}" placeholder="格式: 123456789011" required>
    </div>
    <div class="form-group">
      <label for="gender">性别:</label>
      <select id="gender" name="sex" required>
        <option value="">选择性别</option>
        <option value="1">男</option>
        <option value="2">女</option>
      </select>
    </div>
    <input type="submit" value="注册">
  </form>
</div>
</body>
</html>
